﻿using Architecture.Common;
using Microsoft.AspNetCore.Mvc;
using System.Security.Claims;
using Architecture.Api.Application.Command.UserInfoCommand;
using Architecture.Api.Dtos;
using MediatR;

namespace Architecture.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class LoginController : ControllerBase
    {
        private readonly IMediator _mediator;

        public LoginController(IMediator mediator)
        {
            _mediator = mediator;
        }

        [HttpPost]
        public async Task<ApiResult<LoginDto>> LoginDo(UserLoginCommand command)
        {
            return await _mediator.Send(command);
        }
    }
}